﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/AdminMaster.Master" Inherits="System.Web.Mvc.ViewPage<VietThuongLMS.ViewModels.PhanCongViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <legend>
        <h2>
            Thời khóa biểu</h2>
    </legend>

                <!-- BEGIN PAGE CONTENT-->

            <div class="row-fluid">
                <div class="span12 responsive" data-tablet="span9 fix-margin" data-desktop="span9">
                    <!-- BEGIN CALENDAR PORTLET-->
                    <div class="widget yellow">
                        <div class="widget-title">
                            <h4><i class="icon-calendar"></i> Calendar</h4>
                            <span class="tools">
                                <a href="javascript:;" class="icon-chevron-down"></a>
                                <a href="javascript:;" class="icon-remove"></a>
                            </span>
                        </div>
                        <div class="widget-body">
                            <div id="calendar" class="has-toolbar"></div>
                        </div>
                    </div>
                    <!-- END CALENDAR PORTLET-->
                </div>
            </div>

            <!-- END PAGE CONTENT-->    
<script type="text/javascript" src="<%=ResolveUrl("~/Plugins/Metrolab/assets/fullcalendar/fullcalendar/fullcalendar.min.js")%>"></script>
<script type="text/javascript" src="<%=ResolveUrl("~/Plugins/Metrolab/assets/fullcalendar/fullcalendar/jquery.qtip.min.js")%>"></script>
<!--script for this page only-->
<script type="text/javascript">
    var Script = function () {
    var date = new Date();
    var d = date.getDate();
    var m = date.getMonth();
    var y = date.getFullYear();
        /* initialize the calendar
        -----------------------------------------------------------------*/
        $('#calendar').fullCalendar({
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,basicWeek,basicDay'
            },
            editable: false,
            droppable: false, // this allows things to be dropped onto the calendar !!!
//            events: [
//            {
//                title: 'All Day Event',
//                start: "2014/05/27"
//            }
//        ],
            eventSources: [
                // your event source
                {
                url: '/Admin/ThoiKhoaBieu/GetTKB',
                    type: 'POST',
                    error: function() {
                        alert('there was an error while fetching events!');
                    },
                    color: 'yellow',   // a non-ajax option
                    textColor: 'black' // a non-ajax option
                }
                // any other sources...
            ],
            eventRender: function (event, element) {
                element.qtip({
                    content: 'Giờ học: ' + event.thoigianBD + '-' + event.thoigianKT + '<br />Giáo viên: ' + event.giaovien + '<br/>Học viên: <br/>' + event.dshocvien,
                    style: {
                        background: 'black',
                        color: '#FFFFFF'
                    },
                    position: {
                        corner: {
                            target: 'center',
                            tooltip: 'bottomMiddle'
                        }
                    }
                });
            }

        })
    } ();
</script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
